package com.sakura.mapper;

import com.sakura.entity.Shop;
import org.apache.ibatis.annotations.*;

/**
 * Created by apple on 2018/12/25.
 */
public interface ShopMapper {
    @Select("SELECT * FROM t_shop WHERE id = #{id}")
    @Results(value = { @Result(id = true, column = "id", property = "id"),
            @Result(column = "shop_name", property = "shopName") })
    public Shop getShop(@Param("id") int id);

    @Update({ "update t_shop set shop_name = #{shopName} where id = #{id}" })
    int updateShopById(@Param("shopName")String shopName, @Param("id") int id);
}
